import { reactive } from "vue";
import type { FormRules } from "element-plus";

/** 自定义表单规则校验 */
export const formRules = reactive(<FormRules>{
  name: [{ required: true, message: "车辆名称为必填项", trigger: "blur" }],
  ip: [{ required: true, message: "IP为必填项", trigger: "blur" }],
  port: [{ required: true, message: "端口为必填项", trigger: "blur" }],
  brand: [{ required: true, message: "品牌为必填项", trigger: "blur" }],
  model: [{ required: true, message: "型号为必填项", trigger: "change" }],
//   vehicletype: [{ required: true, message: "车型为必填项", trigger: "change" }],
  mapid: [{ required: true, message: "适用地图为必填项", trigger: "change" }],
  moveheight: [{ required: true, message: "行走高度为必填项", trigger: "blur" }],
  movelowheight: [{ required: true, message: "载货行走高度为必填项", trigger: "blur" }],
  status: [{ required: true, message: "状态为必填项", trigger: "change" }],
  sort: [{ required: true, message: "排序为必填项", trigger: "blur" }],
});
